Skip to content

chore: create the GitHub release automatically on tag push (#DS-3378) - #1887

Merged
lskramarov merged 3 commits into
mainfrom
chore/DS-3378
Aug 13, 2026
Merged

chore: create the GitHub release automatically on tag push (#DS-3378)#1887
lskramarov merged 3 commits into
mainfrom
chore/DS-3378

Conversation

@lskramarov

Copy link
Copy Markdown
Contributor

No description provided.

@lskramarov lskramarov self-assigned this Aug 12, 2026
Copilot AI lite review requested due to automatic review settings August 12, 2026 14:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the release pipeline so that pushing a version tag automatically creates a GitHub Release with auto-generated notes, and adds supporting automation/documentation around release note categorization.

Changes:

  • Adds a dedicated “GitHub Release” job to the Publish workflow, including a workflow_dispatch backfill path and concurrency controls for the “Latest” badge.
  • Introduces an automated PR labeling workflow (based on conventional-commit type) and a .github/release.yml mapping to drive GitHub’s generated release-note categories.
  • Updates the releasing guide and removes now-obsolete CLI/workflow helpers related to manual GitHub release creation and changelog extraction.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/cli/src/release/publish-release-github-ci.ts Removes a now-misleading log line related to GitHub release posting in the CLI task.
packages/cli/src/release/git/github-urls.ts Removes an unused helper for constructing the “new release” URL.
docs/guides/05-releasing-packages.md Rewrites the release process docs to reflect tag-triggered publishing + automated GitHub releases and backfill options.
.github/workflows/publish.yml Adds workflow_dispatch input and a new “GitHub Release” job that creates releases from tags and manages the Latest badge.
.github/workflows/pr-label.yml Adds a workflow to apply labels derived from conventional-commit PR titles/bodies.
.github/workflows/actions/generate-changelog/action.yml Removes a composite action for changelog extraction that is no longer used.
.github/release.yml Adds release-note categorization configuration used by GitHub’s auto-generated notes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/publish.yml
Comment thread .github/workflows/publish.yml Outdated
A tag push already publishes to npm, but the GitHub release was still drafted by hand on
github.com, and that step gets forgotten: 19.8.4 and 19.8.5 are on npm with no release, and
18.39.5, 19.0.0 and 19.1.0 never got one either.

publish.yml grows a second job running `gh release create --generate-notes` on the built-in
token, so the body stays what the "Generate release notes" button produced. It is a separate
job from the one holding NPM_PUBLISH_TOKEN, checks nothing out, and runs only once npm
publishing succeeded. workflow_dispatch takes a tag for a backfill or a retry and skips the
publish job, so the button can never republish to npm.

`--latest` is computed rather than left implicit: the REST API defaults make_latest to true,
so a 19.x patch tagged after 20.x would have taken the badge off 20.x.

release.yml groups the generated notes, and pr-label.yml derives the labels those categories
match on from the conventional-commit type in the pull request title. Over the last 84 merged
pull requests 26 carried no label at all, so the grouping needs a source it can rely on.

Drops the scaffolding this replaces: the "Github release is posted" line that never called the
API, the unreferenced generate-changelog action, and the unused getGithubNewReleaseUrl().

A tag on 19.x runs that branch's own copy of publish.yml, so the job has to be backported there
separately.
- pr-label.yml: split the dependencies check into its own case block so a
  fix(deps)/feat(deps)/docs(deps) title still gets the dependencies label
  instead of losing it to the first-match type check; detect the
  BREAKING CHANGE: footer form, not just the !: title marker; skip no-op
  edits and batch the label calls.
- publish.yml: serialize the github-release job so two concurrent tag
  pushes can't race for the Latest badge; simplify the always() condition
  to the idiomatic !cancelled() && !failure(); stop treating any
  gh release view failure as "release not found".
…3378)

The badge decision read the release currently holding Latest with
`2> /dev/null || true`, so auth, rate-limit and transient GitHub failures all
came back as an empty `current` — indistinguishable from "this repository has
no releases yet". Empty means "nothing holds the badge", so a 19.x patch tagged
during a GitHub blip would have created itself with `--latest=true` and taken
the badge off 20.x. Verified against the pre-fix line with a stubbed gh: a 503
on the lookup yields `--latest=true` for tag 19.9.0.

Same treatment the existence check above already got: "release not found" is
the answer for a repository with no releases at all — checked against
github/gitignore with gh 2.97.0, it is the same string the tag lookup returns —
and there the first release does legitimately take the badge. Anything else
fails the job. stdout and stderr stay separate here because stdout carries the
tag name, so the message goes through a file rather than the `2>&1 1>/dev/null`
swap used above.
@github-actions

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 6f2968e):

https://koobiq-next--prs-1887-1oyyazve.web.app

(expires Sun, 16 Aug 2026 07:55:01 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: c9e37e518febda70d0317d07e8ceb35ac43c534c

@lskramarov
lskramarov merged commit 7f7975c into main Aug 13, 2026
13 checks passed
@lskramarov
lskramarov deleted the chore/DS-3378 branch August 13, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants